<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class SchoolSchoolArea extends Validate
{
    protected $rule = ['school_name' => 'require','school_img' => 'require','school_address' => 'require','school_phone' => 'require',
    ];

    protected $message = ['school_name.require' => '校区名称为必填项','school_img.require' => '校区封面为必填项','school_address.require' => '校区地址为必填项','school_phone.require' => '校区电话为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['school_name','school_img','school_address','school_phone',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['school_name','school_img','school_address','school_phone',]);
    }
}
